﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Presentacion/RestaurantesMaster.master" AutoEventWireup="true" CodeBehind="API_restaurante_Consultar.aspx.cs" Inherits="UricaoWeb.Presentacion.API_restaurante_Consultar" %>

<asp:Content runat="server" ID="Content3" ContentPlaceHolderID="ContenidoDelModulo2">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="scriptManager" runat="server"></asp:ScriptManager>
        <h2>Consultar restaurantes</h2>
			<div class="wrapper" style="text-align: center">
               <br />
                 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:UricaoBD %>" SelectCommand="SELECT [IdHabitacion] FROM [Habitacion]"></asp:SqlDataSource>
               <br/>
                 <asp:RadioButton ID="RadioButtonConsultaCompleta" runat="server" 
                        GroupName="ConsultarCargos" Text="Todos:" OnCheckedChanged="RadioButtonTodosCargos_CheckedChanged1R" Checked="True"/> 
                <asp:RadioButton ID="consultaClasePorEstatus" runat="server" 
                        GroupName="ConsultarCargos" Text="Abiertos" OnCheckedChanged="RadioButtonActivosCargos_CheckedChanged1R"/>
                <asp:RadioButton ID="consultaClasePorNombres" runat="server" 
                        GroupName="ConsultarCargos" Text="Cerrados" OnCheckedChanged="RadioButtonInactivosCargos_CheckedChanged1R"/>
               <br />
               <br />
                <asp:UpdatePanel ID="UDP" runat="server"> 
                  <ContentTemplate> 
                       <asp:GridView ID="GridView_ConsultarRestaurante" runat="server"  Width="530px" Height="96px" ForeColor="#333333" 
                           GridLines="None"
                           AllowPaging="True"
                           OnPageIndexChanging="GVConsultar_PageIndexChanging" CssClass="mGrid"  >
                        <AlternatingRowStyle BackColor="White" />
                           
                        <EditRowStyle BackColor="#2461BF" HorizontalAlign="Center" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerSettings PageButtonCount="4" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />

                   </asp:GridView>
                      
                  </ContentTemplate> 
                </asp:UpdatePanel>
                 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="IdRestaurante" DataSourceID="SqlDataSource2" EmptyDataText="No hay registros de datos para mostrar.">
                   <Columns>
                       <asp:HyperLinkField DataNavigateUrlFields="IdRestaurante" DataNavigateUrlFormatString="API_restaurante_gestion_mesa.aspx?idRestaurante={0}" HeaderText="Gestion Mesas" Text="Gestionar mesas" />
                        <asp:HyperLinkField DataNavigateUrlFields="IdRestaurante" DataNavigateUrlFormatString="API_menu_BuscarMenu.aspx?idRestaurante={0}" HeaderText="Ver detalle menu" Text="Ver menus" />
                        <asp:HyperLinkField DataNavigateUrlFields="IdRestaurante" DataNavigateUrlFormatString="~/Presentacion/API_restaurante_Modificar_Restaurante.aspx?IdRestaurante={0}" HeaderText="Editar Restaurante" Text="Editar" /> 
                    </Columns> 
                </asp:GridView> 
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:UricaoBD %>" DeleteCommand="DELETE FROM [Restaurante] WHERE [IdRestaurante] = @IdRestaurante" ProviderName="<%$ ConnectionStrings:UricaoBD.ProviderName %>" SelectCommand="SELECT [IdRestaurante] FROM [Restaurante]">
                    <DeleteParameters>
                        <asp:Parameter Name="IdRestaurante" Type="Int32" />
                    </DeleteParameters>
                </asp:SqlDataSource>
                <br />
                <br />
                <asp:Button ID="BotonConsultar" runat="server" Text="Consultar" OnClick="Button1_Click" CssClass="botonCualquiera" />
               <br />
               <br />
               <br />

			</div>
    </form>
</asp:Content>
